import axios from 'axios'

const instance = axios.create({
  baseURL: 'http://localhost:3000',
})

instance.interceptors.request.use(
  (config: any) => {
    config.headers.token =
      'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiLmnLHlhYPnkosiLCJpYXQiOjE2NTM2MzEwMTIsImV4cCI6MTY1MzcxNzQxMn0.YU-EXLOcpnWnLGwag6LyUM99tPuI6EHyfsInKDugowM'
    return config
  },
  (err) => {
    return Promise.reject(err)
  }
)

export default instance
